package com.lin.zoo.view;

import com.lin.zoo.controller.ParkController;

import javax.swing.*;

public class VisitorPage extends JPanel {

    private  JButton reInformation =new JButton("修改个人信息");
    //修改个人信息的页面
    private  JButton vPark =new JButton("查看园区信息");
    //查看园区信息
    private JButton vInformation =new JButton( "查看个人信息");

    private JButton indent =new JButton("门票订单系统");

    private JButton activityAndComment=new JButton("查看活动与评论");

    public JButton getActivityAndComment() {
        return activityAndComment;
    }

    public void setActivityAndComment(JButton activityAndComment) {
        this.activityAndComment = activityAndComment;
    }

    public JButton getReInformation() {return reInformation;}

    public void setReInformation(JButton reInformation) {this.reInformation = reInformation;}

    public JButton getVPark() {return vPark;}

    public void setVPark(JButton vPark) {this.vPark = vPark;}

    public JButton getVInformation() {return vInformation;}

    public void setVInformation(JButton vInformation) {this.vInformation = vInformation;}

    public static ParkController getparkController(){
        return new ParkController();
    }

    public JButton getIndent() {
        return indent;
    }

    public void setIndent(JButton indent) {
        this.indent = indent;
    }

    public void createAndShowGUI() {

        JFrame frame = new JFrame("游客界面");
        frame.setVisible(true);
        frame.setSize(1000,530);

        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        // 显示窗口
        frame.setResizable(false);
        //固定窗口大小不被修改
        frame.setLocationRelativeTo(null);
        //窗口处于中央

        init();
        frame.setLayout(null);
        frame.add(reInformation);
        frame.add(vPark);
        frame.add(vInformation);
        frame.add(indent);
        frame.add(activityAndComment);
    }

    private void init(){
        //需要1000*500的空间
        vInformation.setSize(200,100);
        vInformation.setLocation(100,100);

        vPark.setSize(200,100);
        vPark.setLocation(400,100);

        reInformation.setSize(200,100);
        reInformation.setLocation(700,100);

        indent.setSize(200,100);
        indent.setLocation(100,300);

        activityAndComment.setSize(200,100);
        activityAndComment.setLocation(400,300);
    }
}
